#include <stdio.h>
#include <stdlib.h>
#include "single_list.h"
int main(int argc, char *argv[])
{
    _SList head = create_list();
    _SNode *tmp = NULL;
    _SNode *node = NULL;

    int i = 0;
    int j= 0;

    for (i; i < 10; i++)
    {
	printf("please input a number:\n");
	node = create_node();
	scanf("%d", &j);
	init_node(node, j);
	insert_to_list(head, node);
    }
    print_list(head);
#if 0
    for (tmp = head->next; tmp != NULL; tmp = tmp->next)
    {
	printf("%d\n", tmp->elem);
    }
#endif 
    printf("please input the node you want to delete:\n");
    node = create_node();
    scanf("%d", &j);
    delete_node(head, (void *)j);

    print_list(head);
#if 0
    for (tmp = head->next; head != NULL && tmp != NULL; tmp = tmp->next)
    {
	printf("%d\n", tmp->elem);
    }
#endif
}

